package com.driver.enums;

import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @description 用户性别枚举类，对应user中的sex字段
 */
public enum UserSex implements IEnum<Integer> {

    UNKNOWN(0, "未知", "先生/女士"),

    MALE(1, "男", "先生"),

    FEMALE(2, "女", "女士");

    @JsonValue
    private final Integer code;

    private final String message;

    private final String call;

    UserSex(int code, String message, String call) {
        this.code = code;
        this.message = message;
        this.call = call;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public String getCall() {
        return call;
    }

    @Override
    public Integer getValue() {
        return code;
    }
}
